<script setup>
import { ArrowRight, ArrowDown } from '@element-plus/icons-vue'

const videoList = ref([
  {
    img: "/_nuxt/assets/resources/detail/1.jpg",
    title: "AI在医学领域：基础模型和视觉-语言模型在计算病理学应用概述",
    time: "8/20 19:20",
  },
  {
    img: "/_nuxt/assets/resources/detail/2.jpg",
    title: "AI在医学领域：基础模型和视觉-语言模型在计算病理学应用概述",
    time: "8/20 19:20",
  },
  {
    img: "/_nuxt/assets/resources/detail/3.jpg",
    title: "AI在医学领域：基础模型和视觉-语言模型在计算病理学应用概述",
    time: "8/20 19:20",
  },
  {
    img: "/_nuxt/assets/resources/detail/1.jpg",
    title: "AI在医学领域：基础模型和视觉-语言模型在计算病理学应用概述",
    time: "8/20 19:20",
  },
])
</script>

<template>

    <section class="boxCon">
        <header class="header">
            <h1 class="title">
                视频
            </h1>

            <div class="more">
                <span>更多</span>
                <el-icon>
                    <ArrowRight />
                </el-icon>
            </div>
        </header>

        <div class="body">
            <div v-for="(item, index) in videoList" class="videoItem">
                <img :src="item.img" alt="" class="videoImg">

                <div class="content">
                    <h2 class="title">
                        {{ item.title }}
                    </h2>

                    <p class="time">{{item.time}}</p>
                </div>
            </div>
        </div>

    </section>

</template>

<style scoped lang="scss">
// 多行隐藏
@mixin textoverflow($clamp: 1) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $clamp;
    /*! autoprefixer: ignore next */
    -webkit-box-orient: vertical;
}

.boxCon {
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #FFFFFF;
    position: relative;
    padding: 14px 18px;
    box-sizing: border-box
}

.header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #E5E5E5;

    .title {
        font-weight: 500;
        font-size: 18px;
        color: #000000;
    }

    .more {
        cursor: pointer;
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #666666;
    }
}

.body {
    .videoItem {
        display: flex;
        padding: 10px 0;
        .videoImg {
            width: 120px;
            height: 72px;
            object-fit: cover;
            display: block;
            border-radius: 4px;
            margin-right: 10px;
            flex:none;
        }

        .title {
            font-weight: 500;
            font-size: 16px;
            color: #333333;
            line-height: 22px;
            height: 44px;
            margin-bottom: 8px;
            @include textoverflow(2)
        }

        .time {
            font-weight: 400;
            font-size: 14px;
            color: #999999;
        }
    }
}
</style>